
function checkidnum(idnum) {

	if (!idnum || !(/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(idnum))) {
    ELEMENT.Message.error("身份证号不正确");
		return false
	} else {
		return true
	}
}

function checkmobile(mobile) {

  if(!/^1[3|4|5|6|7|8|9][0-9]{9}$/.test(mobile)){
    ELEMENT.Message.error("请输入正确手机号");
    return false
  }else{
    return true
  }

}

const morentu = (url) =>{
  if(url){
    if(url.startsWith('http')){

    }else{
      url = '/static/img/kenan.jpg'
    }
  }else{
      url = '/static/img/kenan.jpg'
  }
  return url
}

export default{
  checkidnum,morentu,checkmobile
}
